<template>
  <div>我是孙子组件-接受爷爷传过来的值：{{ name }}</div>
  <div>我是孙子组件-接受爷爷传过来响应式的值：{{ age }}</div>
</template>

<script>
import { inject } from "vue";
export default {
  setup() {
    const name = inject("name");
    console.log(name);
    const age = inject('age')
    console.log(age)
    return {
      name,
      age
    };
  },
};
</script>

<style>
</style>